package com.yuanfeng.payment.feign;

import com.yuanfeng.commoms.dto.userms.UserTokenBeanDTO;
import com.yuanfeng.commoms.util.ResponseResult;
import com.yuanfeng.commoms.vo.shop.ShopUserMessageResultVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author Stranger
 * @date 2023/4/3 16:42
 */
@FeignClient(name = "mall-business", url = "http://localhost:8087")
public interface BusinessServiceClient {

    /**
     * 根据店铺和用户查询是否开启账期
     *
     * @param userTokenBeanDTO
     * @return
     */
    @PostMapping("/shop/accountPeriod/queryAccountByIds")
    ResponseResult queryAccountByIds(@RequestBody UserTokenBeanDTO userTokenBeanDTO);


    @GetMapping("shopBase/info/selectUserIdByShopId")
    ShopUserMessageResultVO queryUserId(@RequestParam("shopId") Integer shopId);

    @PostMapping("shop/RetentionMoneyRecord/recharge")
    public ResponseResult recharge(@RequestBody Map<Object,Object> map);
}
